cmake_minimum_required(VERSION 3.16)
project(three_body LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

if(NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE Release)
endif()

add_executable(three_body WIN32
    src/win_main.cpp
    src/renderer_win32.cpp
    src/physics.cpp
    src/app.cpp
)

if (MINGW)
  target_compile_options(three_body PRIVATE -O2 -Wall -Wextra)
endif()

target_link_libraries(three_body PRIVATE user32 gdi32)
target_link_options(three_body PRIVATE -static)
